package com.sky.controller.admin;

import com.sky.result.Result;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

@RestController("userShopStatus")
@Slf4j
@RequestMapping("/user/shop")
@Api(tags = "店铺管理")
public class userShopController {

    @Autowired
    private RedisTemplate redisTemplate;



    /**
     * 获取营业状态
     * @return
     */
    @GetMapping("/status")
    public Result<Integer> getShopStatus(){
        Integer status =(Integer) redisTemplate.opsForValue().get("SHOP_STATUS");
        return Result.success(status);
    }


}
